import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout/index'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/control',
    children: [
      {
        path: '/control',
        component: () => import('@/views/control')
      },
      {
        path: '/playback',
        component: () => import('@/views/playback')
      },
      {
        path: '/3DView',
        component: () => import('@/views/3DView')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
